import {
	request,
	synchro,
	baseUrl
} from './request.js';

module.exports = {
	// 请求接口地址
	baseUrl,
	// 登录
	wxLogin: obj => request(obj, '/api-app/user/wxLogin', 'GET'),
	logout: obj => request(obj, '/api-app/user/logout', 'DELETE'),
	syncUserInfo: obj => request(obj, '/api-app/user/syncUserInfo', 'PUT')
}



// 同步1
/*
this.$api.login({
		data: {
			jsCode: '123456789'
		}
	})
	.then(
		ret => {
			console.log(ret);
		},
		rej => {
			console.log(rej);
		}
	);			
*/

// 同步2
/*
let ret = await this.$api.login({
	data: {
		jsCode: '123456789'
	}
});	
*/


// 异步
/*
login(code) {
	this.$api.login({
		data: {
			jsCode: '123456789'
		},
		success: res => {
			console.log(res);
		},
		complete: data => {
			无论如何都会执行
		}
	});
}
*/
